FORMS = [("address", AddressForm),
         ("paytype", PaymentChoiceForm),
         ("cc", CreditCardForm),
         ("confirmation", OrderForm)]

TEMPLATES = {"address":      "test/checkout/billingaddress.html",
             "paytype":      "test/checkout/paymentmethod.html",
             "cc":           "test/checkout/creditcard.html",
             "confirmation": "test/checkout/confirmation.html"}

def pay_by_credit_card(wizard):
    """Return true if user opts to pay by credit card"""
    # Get cleaned data from payment step
    cleaned_data = wizard.get_cleaned_data_for_step('paytype') or {'method': 'none'}
    # Return true if the user selected credit card
    return cleaned_data['method'] == 'cc'


class OrderWizard(SessionWizardView):
    def get_template_names(self):
        return [TEMPLATES[self.steps.current]]

    def done(self, form_list, **kwargs):
        do_something_with_the_form_data(form_list)
        return HttpResponseRedirect('/page-to-redirect-to-when-done/')